package com.medicalproject.controller;

import com.medical.pojo.CleaningTasks;
import com.medical.vo.Rmed;
import com.medicalproject.service.CleaningTasksService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("cleaningtasks")
public class CleaningTasksController {
    @Resource
    private CleaningTasksService cleaningTasksService;


    @RequestMapping("list")
    public Rmed list(){
        return Rmed.suceessData(cleaningTasksService.list());
    }

    @RequestMapping("add")
    public Rmed add(@RequestBody CleaningTasks cleaningTasks){
        return Rmed.suceessData(cleaningTasksService.add(cleaningTasks));
    }



}
